package com.lagou.payrabbitmq.listener;

import com.lagou.payrabbitmq.cache.CancelOrderCache;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * TTLOrderListener
 *
 * @author zyt
 * @since 2020/11/14 23:33
 */
@Component
public class PayDxlListener {

    @RabbitListener(queues = "q.pay.dlx")
    public void onMessage(String message) {
        String[] split = message.split("--");
        CancelOrderCache.cancelOrder.put(split[0],split[1]);
    }

}
